﻿using Complaint.Models.Dtos;
using Complaint.Repositories;

namespace Complaint.Models
{
    public sealed class UnitOfWorkScope : ObjectContextScope<ComplaintEntities>
    {
        /// <summary>
        /// Default constructor. Object changes are not automatically saved at the 
        /// end of the scope.
        /// </summary>
        public UnitOfWorkScope()
        { }

        /// <summary>
        /// Parameterized constructor.
        /// </summary>
        /// <param name="saveAllChangesAtEndOfScope">
        /// A boolean value that indicates whether to automatically save 
        /// all object changes at end of the scope.
        /// </param>
        public UnitOfWorkScope(bool saveAllChangesAtEndOfScope)
            : base(saveAllChangesAtEndOfScope)
        { }
    }
}
